1. Field
Methods and apparatuses consistent with the disclosure provided herein relate to generating Joint Photographic Experts Group (JPEG) files, and more particularly to a method and an apparatus for generating JPEG files suitable for parallel decoding.
2. Description of the Related Art
Generally, image data is stored in compressed form for efficient storage and transmission. The Joint Photographic Experts Group (JEPG) provides a standard for image compression, and thanks to the high compression efficiency, JPEG has been widely used as a file format for compressing still photo images, such as photographs.
The JPEG encoding process generally includes several stages. First, pixels of the image may be converted from red, green and blue (RGB) into YCbCr, in which YCbCr includes one luma component (Y) representing brightness and two chroma components (Cb and Cr) representing colors.
Next, the image may be divided into 8×8 pixel blocks, in which each of Y, Cb and Cr data is discrete cosine transformed (DCT) with respect to each block, and amplitude, the frequency component, is quantized.
Next, after the DCT process, the resultant data with respect to all the 8×8 pixel blocks are additionally compressed using techniques including, for example, zig-zag scanning, Huffman coding, run-length coding, variable length coding (VLC), entropy coding techniques such as applications of coded block patterns (CBP), and a differential technique. Meanwhile, the decoding process may be carried out in reverse order from that of the JPEG encoding stages explained above, in order to reproduce arrays of the pixel values usable for driving a display.
Meanwhile, as the resolution of images increases, the size of a compressed image file is increased in order to obtain an image with better quality. In order to decode these large volumes of image files, a more complicated decoding process is necessary. Accordingly, to improve decoding processing speed, parallel processing is necessary, and the JPEG provides the ‘restart marker’ as a way of parallel processing in order to distinguish entropy-encoded data segments, so that the compressed data segments are decoded independently.
However, since the decoder has to confirm the locations of the restart markers by analyzing the JPEG file in order to carry out parallel decoding, the restart marker alone cannot efficiently support parallel decoding.